<?php

namespace app\common\model;

use think\Model;


class JieChi extends Model
{
    protected $autoWriteTimestamp = true;
    protected $createTime = 'created_at';
    protected $updateTime = 'updated_at';
    protected $insert = ['sort'=>0,'uid'];
    protected $table = "os_jiechi";

    function setUidAttr(){
        return session('admin_id');
    }

    function setContentAttr($value){
        return json_encode($value);
    }

    function getContentAttr($value){
        return json_decode($value,true);
    }

    function getUpdatedAtAttr($value){
        return date('Y-m-d H:i:s',$value);
    }

}
